package com.py.credit.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Company: WWW.xypy.com.cn
 * @ClassName UserEvaInfoService
 * @Description: 信用评价申报业务层
 * @Author: YaoS
 * @Create: 2018-10-24 11:30
 **/
public interface UserEvaInfoService {
    /**
     * 查询模型
     *
     * @param zone
     * @param industry
     * @param reportType
     * @return
     * @author YaoS
     * @date 11:37 18/10/24
     **/
    String selectAllTable(String zone, String industry, String reportType);

    /**
     * 查询审核状态
     *
     * @param
     * @return
     * @author YaoS
     * @date 10:19 18/11/7
     **/
    String selectStatusByModel(String sqr, String modelId);


    /**
     * 查询
     *
     * @param modelId
     * @return ArrayList
     * @author YaoS
     * @date 11:32 18/11/3
     **/
    public ArrayList<Map<String, Object>> selectIndexOrCategroy(String modelId, String sqr,String evainfoId);

    /**
     * 插入所有指标list
     *
     * @param list
     * @param userName
     * @param userId
     * @param modelId
     * @return List
     * @author YaoS
     * @date 15:09 18/10/27
     **/
    void insertIndexTable(List<Map<String, String>> list, String userName, String userId, String modelId,String orgId);

    /**
     * 文件上传
     *
     * @param file
     * @param pathFile
     * @return
     * @author YaoS
     * @date 19:02 18/11/5
     **/
    void fileUpload(MultipartFile file, String pathFile) throws IllegalStateException, IOException;

    void fileDownload(String path, HttpServletRequest request, HttpServletResponse response);

	Integer selectOrgAndModel(@Param(value = "reportType")String reportType,@Param(value = "orgId")String orgId);

	void updateDelFlag(@Param(value = "evalinfoId")String evalinfoId);
	
    List<Map> viewCheck(String modelId, String userId, String evalId);

    Integer selectExistReport(String modelId,String orgId,String sqr);

    /**
     * 查询可选的报告类型
     *
     * @param zone     地区
     * @param industry 行业
     * @return List 报告list
     * @author YaoS
     * @date 14:19 18/12/25
     **/
    List selectReport(String zone,String scoreType, String industry);

}
